<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/12/10
 * Time: 18:39
 */
namespace app\common\widget\subscribe_stat;
use app\common\config\send_config;
use app\common\helper\appmsg_helper;
use app\common\helper\appmsg_send_helper;
use app\common\helper\send_helper;
use app\common\helper\setting_helper;
use app\common\helper\user_helper;
use app\common\helper\weixin_helper;
use app\common\model\Appmsg;
use app\common\model\AppmsgSend;
use app\common\model\SendQueue;
use app\common\model\SendTask;
use app\common\model\SendThread;
use app\common\model\Setting;
use app\common\model\SubscribeStat;
use app\common\widget\weixin\mass_widget;
use app\common\widget\weixin\material_widget;
use app\common\widget\weixin\weixin_widget;

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/12/8
 * Time: 18:00
 */
class subscribe_stat_widget
{
    public function create($params)
    {
        if (!$params || !is_array($params)) {
            return 0;
        }

        $info = array();

        foreach ($params as $k=>$v) {
            if (!is_numeric($v)) {
                $v = filter_string($v);
            }
            $info[$k] = $v;
        }

        return SubscribeStat::create($info);
    }
}